<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<!--管理员Commons-->
<!-- begin::side menu -->
<div class="side-menu" th:fragment="adminsidebar">
    <div class='side-menu-body'>
        <ul>
            <li class="open">
                <a class="active" th:href="@{/hello}"><i class="icon ti-home"></i> <span>首页</span> </a>

            </li>
            <li>
                <a th:href="@{/admin_user}"><i class="icon ti-paint-bucket"></i> <span>用户</span></a></li>

            <li><a th:href="@{/admin_business}"><i class="icon ti-rocket"></i> <span>商户</span> </a>

            </li>
            <li><a th:href="@{/admin_types}"><i class="icon ti-layers-alt"></i> <span>商品种类</span> </a>

            </li>
            <li><a th:href="@{/admin_stream}"><i class="icon ti-paint-roller"></i> <span>商户流水</span> </a>

            </li>
            <li><a href="#"><i class="icon ti-clipboard"></i> <span>Forms</span> </a>

            </li>
            <li>
                <a data-attr="layout-builder-toggle" href="#">
                    <i class="icon ti-layout"></i>
                    <span>模式</span>
                </a>

            </li>
            <li><a href="../static/icons.html"><i class="icon ti-crown"></i> <span>Icons</span> </a></li>
            <li>
                <a href="#">
                    <i class="icon ti-map"></i>
                    <span>Maps</span>
                </a>

            </li>
            <li>
                <a href="#">
                    <i class="icon ti-pie-chart"></i>
                    <span>Charts</span>
                </a>

            </li>

            </li>
        </ul>
    </div>
</div>

<nav class="navbar" th:fragment="adminnavbar">
    <div class="container-fluid">

        <div class="header-logo">
            <a href="#">
                <img th:src="@{/media/image/light-logo.png}" alt="admin">
                <span class="logo-text d-none d-lg-block">LTable</span>
            </a>
        </div>

        <div class="header-body">
            <ul class="navbar-nav">

            </ul>
            <ul class="navbar-nav">
                <li class="nav-item">

                </li>
                <li class="nav-item dropdown">
                    <a href="#" class="nav-link "  name="username" data-toggle="dropdown" >
                        <i name="adminusername">[[${session.identity}]]</i>
                        <input type="hidden" name="adminUsername" th:value="${session.identity}">
                    </a>

                </li>

                <!-- 人物头像               -->
                <li class="nav-item dropdown">
                    <a href="#" data-toggle="dropdown">
                        <figure class="avatar avatar-sm avatar-state-success">
                            <img class="rounded-circle" th:src="@{/media/image/avatar.jpg}" th:alt="${session.identity}">
                        </figure>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a th:href="@{/admin}" class="text-danger dropdown-item">Logout</a>
                    </div>
                </li>
            </ul>
        </div>

    </div>
</nav>

<nav class="navbar" th:fragment="businessnavbar">
    <div class="container-fluid">

        <div class="header-logo">
            <a href="#">
                <img th:src="@{/media/image/light-logo.png}" alt="admin">
                <span class="logo-text d-none d-lg-block">LTable</span>
            </a>
        </div>

        <div class="header-body">
            <ul class="navbar-nav">

            </ul>
            <ul class="navbar-nav">
                <li class="nav-item">

                </li>
                <li class="nav-item dropdown">
                    <a href="#" class="nav-link " data-toggle="dropdown">
                        <i th:text="${session.trueuser.getUsername()}"></i>
                    </a>

                </li>

                <!-- 人物头像               -->
                <li class="nav-item dropdown">
                    <a href="#" data-toggle="dropdown">
                        <figure class="avatar avatar-sm avatar-state-success">
                            <img class="rounded-circle" th:src="${session.trueuser.getPhoto()}" onerror="this.src='../media/image/avatar1.jpg'" th:alt="${session.trueuser.getUsername()}">
                        </figure>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a th:href="@{/user_profile}" class="dropdown-item">Profile</a>
                        <div class="dropdown-divider"></div>
                        <a th:href="@{/logout}" class="text-danger dropdown-item">Logout</a>
                    </div>
                </li>
            </ul>
        </div>

    </div>
</nav>
<!--用户通用页面-->
<div class="side-menu" th:fragment="usersidebar">
    <div class='side-menu-body'>
        <ul>
            <li>
                <a th:href="@{/user_index}"><i class="icon ti-home"></i> <span>首页</span> </a>
            </li>
            <li><a th:href="@{/user_business}"><i class="icon ti-paint-bucket"></i> <span>商品</span> </a>
            </li>
            <li >
                <a  th:href="@{/user_like}"><i class="icon ti-layout"></i><span>猜你喜欢</span></a>
            </li>
            <li><a th:href="@{/user_follow}"><i class="icon ti-rocket"></i> <span>我的关注</span> </a>

            </li>
            <li><a class="active" th:href="@{/user_cart}"><i class="icon ti-layers-alt"></i> <span>购物车</span> </a>

            </li>
            <li><a th:href="@{/user_record}"><i class="icon ti-paint-roller"></i> <span>购物记录</span> </a>

            </li>
            <li><a th:href="@{/user_messages}"><i class="icon ti-clipboard"></i> <span>全部消息</span> </a>

            </li>
            <li><a href="#"><i class="icon ti-crown"></i> <span>Icons</span> </a></li>
        </ul>
    </div>
</div>
<nav class="navbar" th:fragment="usernavbar">
    <div class="container-fluid">

        <div class="header-logo">
            <a href="#">
                <img th:src="@{/media/image/light-logo.png}" th:alt="${session.identity}">
                <span class="logo-text d-none d-lg-block">LTable</span>
            </a>
        </div>

        <div class="header-body">

            <form class="search">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="Search ..."
                           aria-label="Recipient's username"
                           aria-describedby="button-addon2">
                    <div class="input-group-append">
                        <button class="btn" type="button" id="button-addon2">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>
            </form>
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a href="#" class="d-lg-none d-sm-block nav-link search-panel-open">
                        <i class="fa fa-search"></i>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a href="#" class="nav-link nav-link-notify" data-toggle="dropdown">
                        <i class="fa fa-envelope"></i>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right dropdown-menu-big">
                        <div class="dropdown-menu-title d-flex justify-content-between">
                            <div>
                                <h6 class="text-uppercase font-size-12 m-b-0">Messages</h6>
                                <small class="font-size-11 opacity-7">1 unread messages</small>
                            </div>
                        </div>
                        <div class="dropdown-menu-body">
                            <ul class="list-group list-group-flush">
                                <a href="#" class="list-group-item d-flex link-1 hide-show-toggler">
                                    <div>
                                        <figure class="avatar avatar-sm m-r-15">
                                            <span class="avatar-title bg-success rounded-circle">M</span>
                                        </figure>
                                    </div>
                                    <div class="flex-grow-1">
                                        <h6 class="m-b-0 d-flex justify-content-between">
                                            Malanie Hanvey
                                            <i title="Read Mark" data-toggle="tooltip"
                                               class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                        </h6>
                                        <span class="text-muted m-r-10 small">PM 08:50</span>
                                        <span class="text-muted small">Have you mad...</span>
                                    </div>
                                </a>
                                <a href="#" class="list-group-item d-flex link-1 bg-light hide-show-toggler">
                                    <div>
                                        <figure class="avatar avatar-sm m-r-15">
                                            <span class="avatar-title bg-primary rounded-circle">TB</span>
                                        </figure>
                                    </div>
                                    <div class="flex-grow-1">
                                        <h6 class="m-b-0 d-flex justify-content-between">
                                            Kenneth Hune
                                            <i title="Read Mark" data-toggle="tooltip"
                                               class="hide-show-toggler-item fa fa-circle-o font-size-11"></i>
                                        </h6>
                                        <span class="text-muted m-r-10 small">PM 10:23</span>
                                        <span class="text-muted small">I have a meetin...</span>
                                    </div>
                                </a>
                                <a href="#" class="list-group-item d-flex align-items-center link-1 hide-show-toggler">
                                    <div>
                                        <figure class="avatar avatar-sm m-r-15">
                                            <span class="avatar-title bg-danger rounded-circle">M</span>
                                        </figure>
                                    </div>
                                    <div class="flex-grow-1">
                                        <h6 class="m-b-0 d-flex justify-content-between">
                                            Kevin added
                                            <i title="Read Mark" data-toggle="tooltip"
                                               class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                        </h6>
                                        <span class="text-muted m-r-10 small">PM 08:50</span>
                                        <span class="text-muted small">Have you mad...</span>
                                    </div>
                                </a>
                                <a href="#" class="list-group-item d-flex align-items-center link-1 hide-show-toggler">
                                    <div>
                                        <figure class="avatar avatar-sm m-r-15">
                                            <span class="avatar-title bg-info rounded-circle">KC</span>
                                        </figure>
                                    </div>
                                    <div class="flex-grow-1">
                                        <h6 class="m-b-0 d-flex justify-content-between">
                                            Katherine Ember
                                            <i title="Read Mark" data-toggle="tooltip"
                                               class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                        </h6>
                                        <span class="text-muted m-r-10 small">PM 20:13</span>
                                        <span class="text-muted small">I have a meetin...</span>
                                    </div>
                                </a>
                            </ul>
                        </div>
                        <div class="dropdown-menu-footer text-right">
                            <ul class="list-inline small">
                                <li class="list-inline-item">
                                    <a href="#">Mark All Read</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li class="nav-item">
                    <a href="#" class="nav-link " data-toggle="dropdown">
                        <i th:text="${session.trueuser.getUsername()}"></i>
                    </a>
                </li>
                <li class="nav-item dropdown">
                    <a href="#" data-toggle="dropdown">
                        <figure class="avatar avatar-sm avatar-state-success">
                            <img class="rounded-circle" th:src="${session.trueuser.getPhoto()}" th:alt="${session.trueuser.getUsername()}" onerror="this.src='../media/image/avatar.jpg'">
                        </figure>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a th:href="@{/user_profile}" class="dropdown-item">Profile</a>
                        <a href="#" data-sidebar-target="#settings" class="sidebar-open dropdown-item">Settings</a>
                        <div class="dropdown-divider"></div>
                        <a th:href="@{/login}" class="text-danger dropdown-item">Logout</a>
                    </div>
                </li>
                <li class="nav-item d-lg-none d-sm-block">
                    <a href="#" class="nav-link side-menu-open">
                        <i class="ti-menu"></i>
                    </a>
                </li>
            </ul>
        </div>

    </div>
</nav>
</html>